package com.vogue.supplymall.entmanagement.domain.service;

import com.vogue.supplymall.common.domain.dto.LicenceShopSearchInfo;
import com.vogue.supplymall.common.domain.dto.SearchInfo;
import com.vogue.supplymall.entmanagement.domain.dto.LicenceApplyEditDTO;
import com.vogue.supplymall.entmanagement.domain.model.LicenceApply;

import java.util.List;
import java.util.Map;

/**
 * The interface Licence apply service.
 */
public interface LicenceApplyService extends BaseService<LicenceApply, Long> {

    /**
     * Find shop list list.
     *
     * @param licenceShopSearchInfo the licence shop search info
     * @return the list
     */
    List<Map<String, Object>> findShopList(LicenceShopSearchInfo licenceShopSearchInfo);

    /**
     * Find warning list.
     *
     * @param licenceShopSearchInfo the licence shop search info
     * @return the list
     */
    List<Map<String, Object>> findWarning(LicenceShopSearchInfo licenceShopSearchInfo);

    /**
     * 返回查找店铺的结果信息
     *
     * @param searchInfo the search info
     * @return the list
     */
    public List<Map<String, Object>> findLABySyscodeid(SearchInfo searchInfo);

    /**
     * 查找店铺的开通申请记录以及续约记录
     *
     * @param shopid 店铺id
     * @return licence apply edit dto
     */
    public LicenceApplyEditDTO findShopApply(Long shopid);

    /**
     * 保存用户上传的申请信息（包含当前的和续约的）
     *
     * @param dto the dto
     * @return licence apply edit dto
     */
    public LicenceApplyEditDTO saveShopApply(LicenceApplyEditDTO dto) throws Exception;

    /**
     * 删除当前申请审核记录
     *
     * @param applyid 申请记录id
     */
    public void delCurApply(Long applyid);


    /**
     * Count by status long.
     * admin-business使用，查询集团下申请店铺数量
     *
     * @param syscodeid the syscodeid
     * @param status    the status
     * @return the long
     */
    Long countByStatus(Long syscodeid, Integer status);


    /**
     * Count by type long.
     * admin-business使用，查询集团下申请店铺数量
     *
     * @param syscodeid the syscodeid
     * @param applytype the applytype
     * @return the long
     */
    Long countByType(Long syscodeid, Integer applytype);
}
